﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JustMetClient.Models.StrategyModels
{
    /// <summary>
    /// 事件模型
    /// </summary>
    public class EventModel
    {
        /// <summary>
        /// 级别名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 事件处理
        /// </summary>
        public string[] Dispose { get; set; }
        /// <summary>
        /// 获取处理描述
        /// </summary>
        /// <returns></returns>
        public string GetDispose()
        {
            StringBuilder sb = new StringBuilder();
            try
            {
                if (Dispose != null && Dispose.Length > 0)
                {
                    foreach (var item in Dispose)
                    {
                        if (!string.IsNullOrWhiteSpace(item))
                        {
                            sb.Append(item);
                            sb.Append(",");
                        }
                    }
                }
            }
            catch { }
            return sb.ToString();
        }
    }
}
